<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="UTF-8"/>
    <title>在线报名</title>
    <link rel="stylesheet" type="text/css" href="/static/style/style.css"/>
    <script type="text/javascript" src="/static/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#submit").click(function () {
                const jsonObj = {};
                jsonObj.name = $("#name").val();
                jsonObj.mobile = $("#phone").val();
                jsonObj.school = $("#school").val();
                jsonObj.learnType = $("#type").val();
                $.ajax({
                    type: "post",
                    url: "/html/htmlApply",
                    contentType: "application/json",
                    data: JSON.stringify(jsonObj),
                    dataType: "json",
                    success: function (data, textStatus, jqXHR) {
                        if (200 === textStatus) {
                            alert("报名成功");
                        }
                    },
                    error: function () {
                        alert("报名失败");
                    }
                });
            });
        });
    </script>
</head>
<body>
<h2>
    <img src="/static/images/LOGO2.jpg" style="width: 30px; height: 30px;" alt=""/>
    在线报名
    <span class="red"></span>
</h2>
<label for="name">您的名字：</label><input type="text" id="name" name="name" placeholder="请输入你的姓名..."/>
<br/>
<br/>
<label for="phone">手机号码：</label><input type="text" id="phone" name="phone" placeholder="请输入你的手机号码..."/>
<br/>
<br/>
<label for="city">所在城市：</label><input type="text" id="city" name="city" value="桂林市" readonly="readonly"/>
<br/>
<br/>
<label for="school">报名驾校：</label><input type="text" id="school" name="school" placeholder="输入要报名的驾校..."/>
<br/>
<br/>
<label for="type">驾照类型：</label><input type="text" id="type" name="type" placeholder="输入驾照类型..."/>
<br/>
<br/>
<button id="submit" type="submit" style="text-align: center;">报名</button>
</body>
</html>
